import request from "@/common/Ask";
import type { House } from "@/interface/House";
import type { Page } from "@/interface/Page";
import type { Query } from "@/interface/Query";
import type {HouseUser} from "@/interface/HouseUser";

export function listApi( data : Query ) {
    return request<Page<House>>({
        url: 'house/list',
        method: 'post',
        data: data
    });
}


export function operatorApi( data : House ) {
    return request<string>({
        url: 'house/operator',
        method: 'put',
        data: data
    });
}

export function removeApi( ids : string[] ) {
    return request<string>({
        url: 'house/remove',
        method: 'delete',
        data: ids
    });
}

export function auditApi( data : HouseUser ) {
    return request<string>({
        url: 'houseUser/audit',
        method: 'put',
        data: data
    });
}

export function unbindApi( data : HouseUser  ) {
    return request<string>({
        url: 'houseUser/unbind',
        method: 'delete',
        data: data
    });
}
